package com.dingdong.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.dingdong.common.pojo.EUTreeNode;
import com.dingdong.service.ItemCatService;

@Controller
@RequestMapping(value="/item/cat")
public class ItemCatController {
	
	@Autowired
	private ItemCatService itemCatservice;
	
	@RequestMapping(value="/list")
	@ResponseBody
	public List<EUTreeNode> getItemCatList(@RequestParam(value="id",defaultValue="0") long parentId){
		List<EUTreeNode> list = itemCatservice.getItemCatList(parentId);
		return list;
	}
	
}
